<TagAttribute("light_volume","mgs2","????","????",1,332)>
Public Class LIGHT_VOLUME_TAG
Inherits HaloTag
Public Const Extension as String = "light_volume"
Public Const FourCC as String = "mgs2"
Public Const ParentFourCC as String = "????"
Public Const GrandParentFourCC as String = "????"
Public Const [Version] as Short = 1
Public Const HeaderLength as Integer = 332

''' <summary>
''' Draws a sequence of glow bitmaps along a line. Can be used for contrail-type effects as well as volumetric lights.
''' </summary>
#Region "light volume"

''' <summary>
''' the marker name that the light volume should be attached to
''' </summary>
<TagField("attachment marker", 32, 8)>
Public attachment_marker as String

''' <summary>
''' 
''' </summary>
<TagField("", 2, -1)>
Public padding as Byte()

''' <summary>
''' 
''' </summary>
<TagField("flags", 1, 19)>
Public flags as Short

''' <summary>
''' 
''' </summary>
<TagField("", 16, -1)>
Public padding_1 as Byte()

''' <summary>
''' Fades the effect in and out with distance, viewer angle, and external source.
''' </summary>
#End Region
#Region "brightness scale"

''' <summary>
''' distance at which light volume is full brightness
''' </summary>
<TagField("near fade distance:world units", 1, 0)>
Public near_fade_distance as Single

''' <summary>
''' distance at which light volume is zero brightness
''' </summary>
<TagField("far fade distance:world units", 1, 0)>
Public far_fade_distance as Single

''' <summary>
''' brightness scale when viewed at a 90-degree angle
''' </summary>
<TagField("perpendicular brightness scale:[0,1]", 1, 0)>
Public perpendicular_brightness_scale as Single

''' <summary>
''' brightness scale when viewed directly
''' </summary>
<TagField("parallel brightness scale:[0,1]", 1, 0)>
Public parallel_brightness_scale as Single

''' <summary>
''' scales brightness based on external value
''' </summary>
<TagField("brightness scale source", 1, 17)>
Public brightness_scale_source as Short

''' <summary>
''' 
''' </summary>
<TagField("", 2, -1)>
Public padding_2 as Byte()

''' <summary>
''' 
''' </summary>
<TagField("", 20, -1)>
Public padding_3 as Byte()

''' <summary>
''' Bitmap tag used to draw the light volume, repeated <count> times. Default is 'tags\rasterizer_textures\glow'. Note that sprite plates are not valid for light volumes.
''' </summary>
#End Region
#Region "bitmaps"

''' <summary>
''' NOT A SPRITE PLATE
''' </summary>
<TagField("map", 16, 10)>
Public map as New TAG_REFERENCE

''' <summary>
''' 
''' </summary>
<TagField("sequence index", 1, 23)>
Public sequence_index as Short

''' <summary>
''' number of bitmaps to draw (0 causes light volume not to render)
''' </summary>
<TagField("count", 1, 23)>
Public count as Short

''' <summary>
''' 
''' </summary>
<TagField("", 72, -1)>
Public padding_4 as Byte()

''' <summary>
''' Frames are descriptions of the light volume at a particular point in time, interpolated by an external source. For example, a bolt of energy can be made to stretch out and grow thinner as it is fired from a weapon.
''' </summary>
#End Region
#Region "frame animation"

''' <summary>
''' interpolates between frames based on external value
''' </summary>
<TagField("frame animation source", 1, 17)>
Public frame_animation_source as Short

''' <summary>
''' 
''' </summary>
<TagField("", 2, -1)>
Public padding_5 as Byte()

''' <summary>
''' 
''' </summary>
<TagField("", 36, -1)>
Public padding_6 as Byte()

''' <summary>
''' 
''' </summary>
<TagField("", 64, -1)>
Public padding_7 as Byte()

''' <summary>
''' light_volume_frame_block
''' </summary>
<TagField("frames", 176, 11)>
Public frames as List(Of FRAMES_BLOCK)

''' <summary>
''' 
''' </summary>
<TagField("", 32, -1)>
Public padding_8 as Byte()
#End Region
Public Class FRAMES_BLOCK

''' <summary>
''' 
''' </summary>
<TagField("", 16, -1)>
Public padding as Byte()

''' <summary>
''' 
''' </summary>
<TagField("offset from marker:world units", 1, 0)>
Public offset_from_marker as Single

''' <summary>
''' 0 defaults to 1; >1 compresses light near marker, <1 compresses light near far end
''' </summary>
<TagField("offset exponent", 1, 0)>
Public offset_exponent as Single

''' <summary>
''' 0 causes light volume not to render
''' </summary>
<TagField("length:world units", 1, 0)>
Public length as Single

''' <summary>
''' 
''' </summary>
<TagField("", 32, -1)>
Public padding_1 as Byte()

''' <summary>
''' radius near the marker
''' </summary>
<TagField("radius hither:world units", 1, 0)>
Public radius_hither as Single

''' <summary>
''' radius at far end of light volume
''' </summary>
<TagField("radius yon:world units", 1, 0)>
Public radius_yon as Single

''' <summary>
''' 0 defaults to 1; >1 values are more teardrop-shaped, <1 values are more pill-shaped
''' </summary>
<TagField("radius exponent", 1, 0)>
Public radius_exponent as Single

''' <summary>
''' 
''' </summary>
<TagField("", 32, -1)>
Public padding_2 as Byte()

''' <summary>
''' tint color near the marker (alpha is brightness)
''' </summary>
<TagField("tint color hither", 4, 3)>
Public tint_color_hither as Single()

''' <summary>
''' tint color at far end of light volume (alpha is brightness)
''' </summary>
<TagField("tint color yon", 4, 3)>
Public tint_color_yon as Single()

''' <summary>
''' 0 defaults to 1; affects tint color only, not brightness
''' </summary>
<TagField("tint color exponent", 1, 0)>
Public tint_color_exponent as Single

''' <summary>
''' 0 defaults to 1
''' </summary>
<TagField("brightness exponent", 1, 0)>
Public brightness_exponent as Single

''' <summary>
''' 
''' </summary>
<TagField("", 32, -1)>
Public padding_3 as Byte()

End Class

End Class
